package net.wanho.advice;

import net.wanho.vo.AjaxResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * Author：汤小洋
 * Date：2024-08-12 11:38
 * Description：<描述>
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public AjaxResult handleException(Exception e){
        return AjaxResult.error(e.getMessage());
    }

}
